#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include "qtcp_client.h"

QT_BEGIN_NAMESPACE
namespace Ui
{
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

  public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

  private slots:
    void on_connected();
    void on_disconnected();
    void on_errorOccurred(const QString &msg);

    void on_disconnect_btn_clicked();

    void on_clear_msg_btn_clicked();

  private:
    Ui::MainWindow *ui;
    TCPClient *client;
    bool isConnected = false;
};
#endif // MAINWINDOW_H
